<template>
  <view class="search" :style="{backgroundColor:bgc}" @click="searchClick">
    <view class="box" :style="{borderRadius:borderRadius+'rpx'}">
      <uni-icons type="search" size="20"></uni-icons>搜索
    </view>
  </view>
</template>

<script>
  export default {
    name: "my-search",
    props: {
      bgc: {
        type: String,
        default: '#c00000'
        // type:类型,
        // required:必传,
        // default:默认值,
        // validator:(value)=>{return boolean}
      },
      borderRadius: {
        type: Number,
        default: 40
      }
    },
    data() {
      return {

      };
    },
    methods: {
      searchClick() {
        this.$emit('click')
      }
    }
  }
</script>

<style lang="scss" scoped>
  .search {
    padding: 20rpx;
    // background-color: #c00000;

    .box {
      background-color: #fff;
      // border-radius: 40rpx;
      height: 70rpx;
      display: flex;
      justify-content: center;
      align-items: center;
      font-family: '楷体';
    }
  }
</style>